Integrand size = 33, antiderivative size = 297 \[ \int \frac {A+B \tan (c+d x)}{\cot ^{\frac {3}{2}}(c+d x) (a+b \tan (c+d x))} \, dx=\frac {(b (A-B)-a (A+B)) \arctan \left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} \left (a^2+b^2\right ) d}-\frac {(b (A-B)-a (A+B)) \arctan \left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} \left (a^2+b^2\right ) d}-\frac {2 a^{3/2} (A b-a B) \arctan \left (\frac {\sqrt {a} \sqrt {\cot (c+d x)}}{\sqrt {b}}\right )}{b^{3/2} \left (a^2+b^2\right ) d}+\frac {2 B}{b d \sqrt {\cot (c+d x)}}+\frac {(a (A-B)+b (A+B)) \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} \left (a^2+b^2\right ) d}-\frac {(a (A-B)+b (A+B)) \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} \left (a^2+b^2\right ) d} \]
[Out]
Time = 0.83 (sec) , antiderivative size = 297, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.394, Rules used = {3662, 3690, 3734, 3615, 1182, 1176, 631, 210, 1179, 642, 3715, 65, 211} \[ \int \frac {A+B \tan (c+d x)}{\cot ^{\frac {3}{2}}(c+d x) (a+b \tan (c+d x))} \, dx=\frac {(b (A-B)-a (A+B)) \arctan \left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d \left (a^2+b^2\right )}-\frac {(b (A-B)-a (A+B)) \arctan \left (\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{\sqrt {2} d \left (a^2+b^2\right )}+\frac {(a (A-B)+b (A+B)) \log \left (\cot (c+d x)-\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d \left (a^2+b^2\right )}-\frac {(a (A-B)+b (A+B)) \log \left (\cot (c+d x)+\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d \left (a^2+b^2\right )}-\frac {2 a^{3/2} (A b-a B) \arctan \left (\frac {\sqrt {a} \sqrt {\cot (c+d x)}}{\sqrt {b}}\right )}{b^{3/2} d \left (a^2+b^2\right )}+\frac {2 B}{b d \sqrt {\cot (c+d x)}} \]
[In]
[Out]
Rule 65
Rule 210
Rule 211
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 1182
Rule 3615
Rule 3662
Rule 3690
Rule 3715
Rule 3734
Rubi steps \begin{align*} \text {integral}& = \int \frac {B+A \cot (c+d x)}{\cot ^{\frac {3}{2}}(c+d x) (b+a \cot (c+d x))} \, dx \\ & = \frac {2 B}{b d \sqrt {\cot (c+d x)}}+\frac {2 \int \frac {\frac {1}{2} (A b-a B)-\frac {1}{2} b B \cot (c+d x)-\frac {1}{2} a B \cot ^2(c+d x)}{\sqrt {\cot (c+d x)} (b+a \cot (c+d x))} \, dx}{b} \\ & = \frac {2 B}{b d \sqrt {\cot (c+d x)}}+\frac {2 \int \frac {\frac {1}{2} b (A b-a B)-\frac {1}{2} b (a A+b B) \cot (c+d x)}{\sqrt {\cot (c+d x)}} \, dx}{b \left (a^2+b^2\right )}+\frac {\left (a^2 (A b-a B)\right ) \int \frac {1+\cot ^2(c+d x)}{\sqrt {\cot (c+d x)} (b+a \cot (c+d x))} \, dx}{b \left (a^2+b^2\right )} \\ & = \frac {2 B}{b d \sqrt {\cot (c+d x)}}+\frac {4 \text {Subst}\left (\int \frac {-\frac {1}{2} b (A b-a B)+\frac {1}{2} b (a A+b B) x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{b \left (a^2+b^2\right ) d}+\frac {\left (a^2 (A b-a B)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-x} (b-a x)} \, dx,x,-\cot (c+d x)\right )}{b \left (a^2+b^2\right ) d} \\ & = \frac {2 B}{b d \sqrt {\cot (c+d x)}}-\frac {\left (2 a^2 (A b-a B)\right ) \text {Subst}\left (\int \frac {1}{b+a x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{b \left (a^2+b^2\right ) d}-\frac {(b (A-B)-a (A+B)) \text {Subst}\left (\int \frac {1+x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{\left (a^2+b^2\right ) d}-\frac {(a (A-B)+b (A+B)) \text {Subst}\left (\int \frac {1-x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{\left (a^2+b^2\right ) d} \\ & = -\frac {2 a^{3/2} (A b-a B) \arctan \left (\frac {\sqrt {a} \sqrt {\cot (c+d x)}}{\sqrt {b}}\right )}{b^{3/2} \left (a^2+b^2\right ) d}+\frac {2 B}{b d \sqrt {\cot (c+d x)}}-\frac {(b (A-B)-a (A+B)) \text {Subst}\left (\int \frac {1}{1-\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \left (a^2+b^2\right ) d}-\frac {(b (A-B)-a (A+B)) \text {Subst}\left (\int \frac {1}{1+\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \left (a^2+b^2\right ) d}+\frac {(a (A-B)+b (A+B)) \text {Subst}\left (\int \frac {\sqrt {2}+2 x}{-1-\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \sqrt {2} \left (a^2+b^2\right ) d}+\frac {(a (A-B)+b (A+B)) \text {Subst}\left (\int \frac {\sqrt {2}-2 x}{-1+\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \sqrt {2} \left (a^2+b^2\right ) d} \\ & = -\frac {2 a^{3/2} (A b-a B) \arctan \left (\frac {\sqrt {a} \sqrt {\cot (c+d x)}}{\sqrt {b}}\right )}{b^{3/2} \left (a^2+b^2\right ) d}+\frac {2 B}{b d \sqrt {\cot (c+d x)}}+\frac {(a (A-B)+b (A+B)) \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} \left (a^2+b^2\right ) d}-\frac {(a (A-B)+b (A+B)) \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} \left (a^2+b^2\right ) d}-\frac {(b (A-B)-a (A+B)) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} \left (a^2+b^2\right ) d}+\frac {(b (A-B)-a (A+B)) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} \left (a^2+b^2\right ) d} \\ & = \frac {(b (A-B)-a (A+B)) \arctan \left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} \left (a^2+b^2\right ) d}-\frac {(b (A-B)-a (A+B)) \arctan \left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} \left (a^2+b^2\right ) d}-\frac {2 a^{3/2} (A b-a B) \arctan \left (\frac {\sqrt {a} \sqrt {\cot (c+d x)}}{\sqrt {b}}\right )}{b^{3/2} \left (a^2+b^2\right ) d}+\frac {2 B}{b d \sqrt {\cot (c+d x)}}+\frac {(a (A-B)+b (A+B)) \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} \left (a^2+b^2\right ) d}-\frac {(a (A-B)+b (A+B)) \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} \left (a^2+b^2\right ) d} \\ \end{align*}
Time = 0.60 (sec) , antiderivative size = 251, normalized size of antiderivative = 0.85 \[ \int \frac {A+B \tan (c+d x)}{\cot ^{\frac {3}{2}}(c+d x) (a+b \tan (c+d x))} \, dx=-\frac {\sqrt {\cot (c+d x)} \left (2 \sqrt {2} b^{3/2} (b (A-B)-a (A+B)) \left (\arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )-\arctan \left (1+\sqrt {2} \sqrt {\tan (c+d x)}\right )\right )+8 a^{3/2} (-A b+a B) \arctan \left (\frac {\sqrt {b} \sqrt {\tan (c+d x)}}{\sqrt {a}}\right )-\sqrt {2} b^{3/2} (a (A-B)+b (A+B)) \left (\log \left (1-\sqrt {2} \sqrt {\tan (c+d x)}+\tan (c+d x)\right )-\log \left (1+\sqrt {2} \sqrt {\tan (c+d x)}+\tan (c+d x)\right )\right )-8 \sqrt {b} \left (a^2+b^2\right ) B \sqrt {\tan (c+d x)}\right ) \sqrt {\tan (c+d x)}}{4 b^{3/2} \left (a^2+b^2\right ) d} \]
[In]
[Out]
Time = 0.37 (sec) , antiderivative size = 265, normalized size of antiderivative = 0.89
method | result | size |
derivativedivides | \(\frac {\frac {2 B}{b \sqrt {\cot \left (d x +c \right )}}-\frac {2 \left (\frac {\left (A b -B a \right ) \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}}{1+\cot \left (d x +c \right )-\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )\right )}{8}+\frac {\left (-A a -B b \right ) \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )-\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}}{1+\cot \left (d x +c \right )+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )\right )}{8}\right )}{a^{2}+b^{2}}-\frac {2 \left (A b -B a \right ) a^{2} \arctan \left (\frac {a \sqrt {\cot \left (d x +c \right )}}{\sqrt {a b}}\right )}{b \left (a^{2}+b^{2}\right ) \sqrt {a b}}}{d}\) | \(265\) |
default | \(\frac {\frac {2 B}{b \sqrt {\cot \left (d x +c \right )}}-\frac {2 \left (\frac {\left (A b -B a \right ) \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}}{1+\cot \left (d x +c \right )-\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )\right )}{8}+\frac {\left (-A a -B b \right ) \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )-\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}}{1+\cot \left (d x +c \right )+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )\right )}{8}\right )}{a^{2}+b^{2}}-\frac {2 \left (A b -B a \right ) a^{2} \arctan \left (\frac {a \sqrt {\cot \left (d x +c \right )}}{\sqrt {a b}}\right )}{b \left (a^{2}+b^{2}\right ) \sqrt {a b}}}{d}\) | \(265\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 3033 vs. \(2 (257) = 514\).
Time = 8.78 (sec) , antiderivative size = 6092, normalized size of antiderivative = 20.51 \[ \int \frac {A+B \tan (c+d x)}{\cot ^{\frac {3}{2}}(c+d x) (a+b \tan (c+d x))} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {A+B \tan (c+d x)}{\cot ^{\frac {3}{2}}(c+d x) (a+b \tan (c+d x))} \, dx=\int \frac {A + B \tan {\left (c + d x \right )}}{\left (a + b \tan {\left (c + d x \right )}\right ) \cot ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 238, normalized size of antiderivative = 0.80 \[ \int \frac {A+B \tan (c+d x)}{\cot ^{\frac {3}{2}}(c+d x) (a+b \tan (c+d x))} \, dx=\frac {\frac {8 \, {\left (B a^{3} - A a^{2} b\right )} \arctan \left (\frac {a}{\sqrt {a b} \sqrt {\tan \left (d x + c\right )}}\right )}{{\left (a^{2} b + b^{3}\right )} \sqrt {a b}} + \frac {8 \, B \sqrt {\tan \left (d x + c\right )}}{b} + \frac {2 \, \sqrt {2} {\left ({\left (A + B\right )} a - {\left (A - B\right )} b\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + 2 \, \sqrt {2} {\left ({\left (A + B\right )} a - {\left (A - B\right )} b\right )} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) - \sqrt {2} {\left ({\left (A - B\right )} a + {\left (A + B\right )} b\right )} \log \left (\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) + \sqrt {2} {\left ({\left (A - B\right )} a + {\left (A + B\right )} b\right )} \log \left (-\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right )}{a^{2} + b^{2}}}{4 \, d} \]
[In]
[Out]
\[ \int \frac {A+B \tan (c+d x)}{\cot ^{\frac {3}{2}}(c+d x) (a+b \tan (c+d x))} \, dx=\int { \frac {B \tan \left (d x + c\right ) + A}{{\left (b \tan \left (d x + c\right ) + a\right )} \cot \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {A+B \tan (c+d x)}{\cot ^{\frac {3}{2}}(c+d x) (a+b \tan (c+d x))} \, dx=\int \frac {A+B\,\mathrm {tan}\left (c+d\,x\right )}{{\mathrm {cot}\left (c+d\,x\right )}^{3/2}\,\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )} \,d x \]
[In]
[Out]